package com.javarevolutions.ws.client;

import java.rmi.RemoteException;

import javax.swing.JOptionPane;

import com.javarevolutions.ws.bean.BeanLogin;
import com.javarevolutions.ws.service.ImplLogin;
import com.javarevolutions.ws.service.ImplLoginProxy;

public class Principal {
	/**
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		ImplLogin iface = new ImplLoginProxy(
				"http://localhost:8080/ValidaCredenciales/services/ImplLogin");
		BeanLogin obj = new BeanLogin();
		obj.setUsuario("MADD");
		obj.setPassword("Hh");
		try {
			obj = iface.validaLogin(obj);
			if (obj.isStatus()) {
				JOptionPane.showMessageDialog(null, "Welcome Biatch", "hH",
						JOptionPane.INFORMATION_MESSAGE);
			} else {
				System.out.println(obj.getMensaje());
			}
		} catch (RemoteException re) {
			re.printStackTrace();
		}

	}

}
